package com.hrt.manage.resource.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hrt.bean.ResourceType;
import com.hrt.bean.Resources;
import com.hrt.manage.resource.dao.ResourceDao;
import com.hrt.manage.resource.service.ResourceService;

@Service
public class ResourceServiceImpl implements ResourceService {

	@Autowired
	private ResourceDao dao;
	
	public ResourceServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public List<Resources> getProductResource(Long proId,
			Integer isgift, Integer resType, Integer pageIndex, Integer pageSize) {
	
		return dao.getProductResource(proId, isgift,resType, pageIndex, pageSize);
	}

	@Override
	public List<Resources> getProductResource(Long proId,
			Integer resourceType) {
		// TODO Auto-generated method stub
		return dao.getProductResource(proId, resourceType);
	}

	@Override
	public Long saveResource(Resources resource) {
		// TODO Auto-generated method stub
		return dao.saveEntity(resource);
		
	}

	@Override
	public Long countResourceByProductId(Long proId) {
		// TODO Auto-generated method stub
		return dao.countResourceByProductId(proId) ;
	}

	
}
